SHUTDOWN
Section: System Calls (2)
Index
Return to Main Contents
BSD mandoc
BSD 4.2
NAME
shutdown
- shut down part of a full-duplex connection
SYNOPSIS
Fd #include <sys/socket.h>
Ft int
Fn shutdown int s int how
DESCRIPTION
The
Fn shutdown
call causes all or part of a full-duplex connection on
the socket associated with
Fa s
to be shut down.
If
Fa how
is 0, further receives will be disallowed.
If
Fa how
is 1, further sends will be disallowed.
If
Fa how
is 2, further sends and receives will be disallowed.
DIAGNOSTICS
A 0 is returned if the call succeeds, -1 if it fails.
ERRORS
The call succeeds unless:
- Bq Er EBADF
-
Fa S
is not a valid descriptor.
- Bq Er ENOTSOCK
-
Fa S
is a file, not a socket.
- Bq Er ENOTCONN
-
The specified socket is not connected.
SEE ALSO
connect(2),
socket(2)
HISTORY
The
Fn shutdown
function call appeared in
BSD 4.2
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- DIAGNOSTICS
-
- ERRORS
-
- SEE ALSO
-
- HISTORY
-
This document was created by
man2html,
using the manual pages.
Time: 19:41:54 GMT, December 25, 2022